Skip to content

Conversation

wilhelsr
Copy link
Member

Purpose

Centralize shared application state with Redux Toolkit so selected parts, authentication, and notifications stay consistent across pages and components.

Changes

  • Replace build and authentication contexts with Redux slices and a shared store.
  • Update part cards, detail views, and the PC builder to read and update selected parts through Redux.
  • Sync Firebase authentication with Redux while preserving account-specific drafts in local storage.
  • Prevent pending build requests from updating state after switching accounts.
  • Centralize notifications with optional navigation buttons and support for displaying them inside modals.
  • Add authentication tests and update existing component and saved-build tests.

Related issues

Closes #110

Verification

Run from frontend/:

  • npm test — all 106 tests passed across 11 test files.
  • npm run lint — passed.
  • npm run build — passed, with a bundle-size warning for the main JavaScript chunk.

Manual browser testing was also performed to ensure that functionality stayed the same.

Screenshots

Not included applicable.

Checklist

  • I have reviewed my own changes.
  • The changes meet the linked issue's acceptance criteria, where applicable.
  • I have verified the changes and recorded the results above.
  • I have added or updated tests where needed.
  • I have included screenshots for visual changes, or marked them not applicable.

…ate of all selected parts. All actions components affecting this list have been refactored to support the state management instead of the old context
Resolve saved-build conflicts using Redux, retaining account-scoped persistence and authentication features.
@wilhelsr wilhelsr requested a review from a team as a code owner November 14, 2026 09:24
@krgjert krgjert added the enhancement New feature or request label Nov 14, 2026
@krgjert krgjert added this to the 4. underveisinnlevering milestone Nov 14, 2026
Copy link
Member

@krgjert krgjert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, all test run and good refactor on state management!

@krgjert krgjert merged commit 64efc0c into dev Nov 14, 2026
@krgjert krgjert deleted the 110-implement-state-manegement-redux-toolkit branch November 14, 2026 09:29
Sign in to join this conversation on GitHub.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants